<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Banner列表</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}

</style>
</head>
<#include "../template/template_listPage.ftl">
<script type="text/javascript">
$().ready( function() {
	<#if actionErrors??&&(actionErrors?size > 0)>
		$.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
		 modal: true, autoCloseTime: 3000});
	</#if>
	<#if actionMessages??&&(actionMessages?size > 0)>
			$.dialog({type: "success", content: "<#list actionMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 5000});
		</#if>
	
});
 
</script>
</head>
<body class="list">
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>Banner列表管理&nbsp;<span class="pageInfo"></span></h1>
		</div>
		<@pageList page=(page!) id="list" action="${web_base}/go/banner!list.htm" query="bannerInfoQuery" isEmpty=true>
		<div class="operateBar">
		 		<input type="button" class="addButton" onclick="location.href='${web_base}/go/banner!add.htm'" value="新建Banner" />
				<label>查找:</label>
				所属模块:
				<select name="bannerInfoQuery.bannerBelong">
				    <option value="" >全部</option>
					<option value="1" <#if bannerInfoQuery?? && bannerInfoQuery.bannerBelong?? && bannerInfoQuery.bannerBelong=="1">selected="selected"</#if> >首页</option>
					<option value="2" <#if bannerInfoQuery?? && bannerInfoQuery.bannerBelong?? && bannerInfoQuery.bannerBelong=="2">selected="selected"</#if> >家族公益</option>
				</select>
				发布时间:
				 <input type="text" id="startTime" name="bannerInfoQuery.publishTimeStart"
                    onclick="WdatePicker({startDate:'%y',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')||\'%y-%M-%d\'}'})"
                           value="${(bannerInfoQuery.publishTimeStart?string("yyyy-MM-dd HH:mm:ss"))!}" class="Wdate fixWidth" >
			<span>--</span><input type="text" id="endTime" name="bannerInfoQuery.publishTimeEnd"
                   onclick="WdatePicker({startDate:'%y',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime\')}',maxDate:'%y-%M-%d'})"
                   value="${(bannerInfoQuery.publishTimeEnd?string("yyyy-MM-dd HH:mm:ss"))!}" class="Wdate fixWidth">
                    <input type="hidden" name="bannerInfoQuery.orderBy" id="orderBy" value="${bannerInfoQuery.orderBy}" />
				<input type="hidden" name="bannerInfoQuery.orderType" id="order" value="${bannerInfoQuery.orderType}" />
				<input type="submit" id="searchButton" class="searchButton" value="" />
			</div>
			<table class="listTable">
				<tr>
					<th>
						<span class="" name="id">Banner条位置</span>
					</th>
					<th>
						<span class="" name="picPath">Banner图片</span>
					</th>
					<th>
						<span class="" name="belong">所属模块</span>
					</th>
					<th>
						<span class="sort" name="publish_time">发布时间</span>
					</th>
					<th>
						<span class="sort" name="update_time">修改时间</span>
					</th>
					<th width="80">操作<th/>
				</tr>
				<#if  page??&&page.list??&&(page.list?size gt 0) >			
				<#list page.list as obj>
					<tr>
						<td>
							${(obj.bannerOrder)!}
						</td>
						<td>
							<img id="imgShow1" width="80" height="50" src="${(web_base + (obj.bannerPath))!}" />
						</td>
						<td>
							<#if obj.bannerBelong?? && obj.bannerBelong =="1">
								首页
							<#elseif obj.bannerBelong?? && obj.bannerBelong =="2">
								家族公益
							</#if>
						</td>
						<td>
							<#if obj.publishTime?exists&&obj.publishTime?is_date>
								${((obj.publishTime)!)?string("yyyy-MM-dd HH:mm:ss")}
							</#if>
						</td>
						<td>
							<#if obj.updateTime?exists&&obj.updateTime?is_date>
								${((obj.updateTime)!)?string("yyyy-MM-dd HH:mm:ss")}
							</#if>
						</td>
						<td width="80">
							<a href="${web_base}/go/banner!toEdit.htm?id=${(obj.id)!}" title="编辑">[编辑]</a>
						</td>
					</tr>
				</#list>
				<#else>
				    <tr><td colspan="11">
					<div class="noRecord">
						没有找到任何记录!
					</div>	
					</td></tr>
				</#if>	
			</table>

		</@pageList>
	</div>
	
</body>
</html>